package com.bestv.search.common.dao.hibernate;

import com.bestv.search.common.dao.SeriesDao;
import com.bestv.search.common.model.Series;

import java.util.List;

public class SeriesDaoHibernate extends GenericDaoHibernate<Series, Long> implements SeriesDao {

    public SeriesDaoHibernate() {
        super(Series.class);
    }

    public void saveSeriesList(List<Series> list) {
        super.saveObjectList(list);
    }

    @SuppressWarnings("unchecked")
    public List<Series> getProgramByCode(String code) {
        List<Series> list = getHibernateTemplate().find("from Series s where s.code = ?", code);
        return list;
    }

}
